export default {
  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    title: 'blog-nuxt',
    htmlAttrs: {
      lang: 'en'
    },
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: '' },
      { name: 'format-detection', content: 'telephone=no' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
    ]
  },

  // Global CSS: https://go.nuxtjs.dev/config-css
  css: [
    'ant-design-vue/dist/antd.css',
    'quill/dist/quill.snow.css',
    'quill/dist/quill.bubble.css',
    'quill/dist/quill.core.css'
  ],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [
    '@/plugins/antd-ui',
    { src: '@/plugins/vue-mavon-editor', ssr: false },
    {
      src: '@/plugins/nuxt-quill-plugin.js', ssr: false // 仅在客户端渲染
    }
  ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  // buildModules: [
  //   // https://go.nuxtjs.dev/eslint
  //   '@nuxtjs/eslint-module',
  // ],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
    // https://go.nuxtjs.dev/axios
    '@nuxtjs/axios',
    '@nuxtjs/markdownit',
  ],
  markdownit: {
    runtime: true
    // preset: 'default',
    // linkify: true,
    // breaks: true,
    // use: [
    //   'markdown-it-div',
    //   'markdown-it-attrs'
    // ]
  },
  // Axios module configuration: https://go.nuxtjs.dev/config-axios
  axios: {},
  // 设置加载样式
  loading: {
    color: '#1890ff',
    height: '5px'
  },
  env: {
    VUE_APP_TITLE: process.env.VUE_APP_TITLE
  },
  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
  }
}
